package com.shenyi.wx.entity;

import com.shenyi.common.entity.SysRegionDO;
import lombok.Data;

import java.io.Serializable;

/**
 * @author richard.fan
 * @version 1.0
 * @date 2018/11/06
 * @desc
 * @see
 * @since 1.0
 */
@Data
public class RegionDO implements Serializable {

    //主键
    private Integer id;
    //父节点
    private Integer parent_id;
    //区域名称
    private String name;
    //类型 0国家 1省份 2地市 3区县
    private Integer type;
    //区域代理Id
    private Integer agency_id;


    public RegionDO(SysRegionDO sysRegionDO) {
        id = sysRegionDO.getId();
        parent_id = sysRegionDO.getParentId();
        name = sysRegionDO.getName();
        type = sysRegionDO.getType();
        agency_id = sysRegionDO.getAgencyId();
    }
}
